from django.urls import path, re_path
from django.views.static import serve

from .views import *
from user.utils.Authentication import LoginView
from django.conf import settings
from django.conf.urls.static import static

app_name = 'user'

urlpatterns = [
    path('login', LoginView.as_view(), name='login'),
    path('register', Register.as_view(), name='register'),
    path('get_user_info', GetUserInfo.as_view(), name='get_user_info'),
    path('loginUserInfo', get_login_user_info, name='login_user_info'),
    path('selectUserPage', SelectUserPage.as_view(), name='select_user_page'),
    path('operation', UserOperation.as_view(), name='user_operation'),
    path('delete/batch', DeleteBatchUser.as_view(), name='delete_batch_user'),

    # 上传头像
    path('upload/avatar', UploadAvatar.as_view(), name='upload_avatar'),

    path('parseToken', parseToken, name='parse_token'),

    # 用户评论相关接口
    path('comments/operation', UserCommentsOperation.as_view(), name='user_comments_operation'),

    # 用户数据导出接口
    path('download', DownLoadUser.as_view(), name='download_user'),
    # 下载表格模版
    path('downloadTemplate', DownLoadTemplate.as_view(), name='download_template'),
    # 用户数据导入接口
    path('upload', UploadUser.as_view(), name='upload_user')
]
